from app import db


class User(db.Model):

    __tablename__ = 'tbl_user'

    User_id = db.Column(db.String(10), primary_key=True)
    User_pwd = db.Column(db.String(20), nullable=False)
    User_identity = db.Column(db.Integer, nullable=False)

    def to_json(self):
        return {
            "User_id": self.User_id,
            "User_pwd": self.User_pwd,
            "User_identity": self.User_identity
        }
